var browser = {};
var ua = navigator.userAgent.toLowerCase();
window.ActiveXObject ? browser.ie = ua.match(/msie ([\d.]+)/)[1] :
document.getBoxObjectFor ? browser.firefox = ua.match(/firefox\/([\d.]+)/)[1] :
window.MessageEvent && !document.getBoxObjectFor ? browser.chrome = ua.match(/chrome\/([\d.]+)/)[1] :
window.opera ? browser.opera = ua.match(/opera.([\d.]+)/)[1] :
window.openDatabase ? browser.safari = ua.match(/version\/([\d.]+)/)[1] : 0;


var Sys = {};
var ua = navigator.userAgent.toLowerCase();
var s;
(s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] :
(s = ua.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] :
(s = ua.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] :
(s = ua.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] :
(s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;